import {getGoodsBannerApi} from "@/api/home/goodsBanner";
import {onMounted, ref} from "vue";
import type {GoodsBannerVO} from "@/api/home/goodsBanner/types";


export function useBanner(){
    const goodsBannerList = ref<GoodsBannerVO[]>([]);
    const getBannerList = async () => {
        const {data} = await getGoodsBannerApi();
        goodsBannerList.value = data;
    }
    onMounted(async ()=>{
        await getBannerList();
    })
    return {
        goodsBannerList
    }
}

